package com.huizu.goods.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.huizu.common.core.text.Convert;
import com.huizu.goods.domain.StoreGoodsImage;
import com.huizu.goods.mapper.StoreGoodsImageMapper;
import com.huizu.goods.service.IStoreGoodsImageService;

/**
 * 商品轮播图Service业务层处理
 * 
 * meidouhui
 * @date 2020-04-22
 */
@Service
public class StoreGoodsImageServiceImpl implements IStoreGoodsImageService {
	@Autowired
	private StoreGoodsImageMapper dao;

	/**
	 * 查询商品轮播图
	 * 
	 * @param id
	 *            商品轮播图ID
	 * @return 商品轮播图
	 */
	@Override
	public StoreGoodsImage selectShopProductImageById(Long id) {
		return dao.selectShopProductImageById(id);
	}

	/**
	 * 查询商品轮播图列表
	 * 
	 * @param shopProductImage
	 *            商品轮播图
	 * @return 商品轮播图
	 */
	@Override
	public List<StoreGoodsImage> selectShopProductImageList(StoreGoodsImage shopProductImage) {
		List<StoreGoodsImage>  list=dao.selectShopProductImageList(shopProductImage);
		
		return list;
	}

	/**
	 * 新增商品轮播图
	 * 
	 * @param shopProductImage
	 *            商品轮播图
	 * @return 结果
	 */
	@Override
	public int insertShopProductImage(StoreGoodsImage shopProductImage) {
		return dao.insertShopProductImage(shopProductImage);
	}

	/**
	 * 修改商品轮播图
	 * 
	 * @param shopProductImage
	 *            商品轮播图
	 * @return 结果
	 */
	@Override
	public int updateShopProductImage(StoreGoodsImage shopProductImage) {
		return dao.updateShopProductImage(shopProductImage);
	}

	/**
	 * 删除商品轮播图对象
	 * 
	 * @param ids
	 *            需要删除的数据ID
	 * @return 结果
	 */
	@Override
	public int deleteShopProductImageByIds(String ids) {
		return dao.deleteShopProductImageByIds(Convert.toStrArray(ids));
	}

	/**
	 * 删除商品轮播图信息
	 * 
	 * @param id
	 *            商品轮播图ID
	 * @return 结果
	 */
	@Override
	public int deleteShopProductImageById(Long id) {
		return dao.deleteShopProductImageById(id);
	}
}
